﻿<UserControl x:Class="PHPVHReportViewer.Views.DynamicAnalysisVulnerabilityViewerControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:views="clr-namespace:PHPVHReportViewer.Views">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition MinWidth="9" MaxWidth="500"  Width="160" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Border Grid.Row="1" Style="{StaticResource BorderStyle}">
            <ListBox Grid.Row="1" x:Name="ItemListBox" Background="Transparent"
                                 SelectedItem="{Binding CurrentAlert,Mode=TwoWay}"
                                 ItemsSource="{Binding Alerts}">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Margin="2,2,4,2"  Text="{Binding Item.AlertName}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Border>

        <views:DynamicAnalysisVulnerabilityControl 
                                Grid.Row="1" Grid.Column="1" Margin="2,0,0,2"
                                DataContext="{Binding CurrentAlert}" />


        <GridSplitter Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch" Width="4"
                                          Background="Transparent" Margin="-2,0,0,0"
                                          HorizontalAlignment="Left"/>
    </Grid>
</UserControl>
